package a.f.l.a;

import a.c.d;
import a.c.e;
import a.c.k;
import a.c.m;
import a.c.z;
import a.d.t;
import a.d.w;
import a.f.*;
import a.f.o;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;

import a.d.w;
import a.f.l.a.s;
import a.d.t;
import a.f.l.a.y;
import a.f.l.a.u;

class y
  extends u
{
  private static final double d = 1.0D;
  private static final double e = 1.0E-006D;
  
  public void a(qb paramqb, s params)
  {
    boolean bool = sb.e;
    int i = sb.d;
    super.a(paramqb, params);
    o localo = paramqb.a();
    k localk1 = localo.c(bd.a);
    k localk2 = localo.c(ad.q);
    k localk3 = localo.c(ad.r);
    if (!bool) {
      if (localo.c(ed.a) == null)
      {
        if (bool) {
          break label105;
        }
        if ((localo.c(ed.b) == null) && ((bool) || (localk1 == null)) && ((bool) || ((localk2 == null) && (localk3 == null)))) {
          return;
        }
      }
    }
    label105:
    m localm = localo.w();
    label335:
    label618:
    label620:
    label629:
    label762:
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        e locale1 = locald.e();
        e locale2 = locald.f();
        z localz1 = new z();
        z localz2 = new z();
        Object localObject2;
        if (!bool) {
          if (a(localo, locald))
          {
            localObject1 = cd.d(localo, locald);
            if (!bool) {
              if (localObject1 != null) {
                localz1.add(a((cd)localObject1, localo, locald, true));
              }
            }
            localObject2 = cd.e(localo, locald);
            if (!bool)
            {
              if (localObject2 == null) {
                break label618;
              }
              if (bool) {
                break label620;
              }
              localz2.add(a((cd)localObject2, localo, locald, false));
            }
            if (i == 0) {
              break label618;
            }
          }
        }
        if (!bool) {
          if (c(localo, locald))
          {
            if (!bool) {
              if (localk2 != null)
              {
                if (bool) {
                  break label335;
                }
                if (localk2.get(locald) != null)
                {
                  if (bool) {
                    break label335;
                  }
                  localObject1 = (List)localk2.get(locald);
                  if (!((List)localObject1).isEmpty()) {
                    localz1.addAll((Collection)localObject1);
                  }
                }
              }
            }
            if (((!bool) && (localk3 == null)) || ((!bool) && (localk3.get(locald) == null))) {
              break label618;
            }
            localObject1 = (List)localk3.get(locald);
            if (!bool)
            {
              if (((List)localObject1).isEmpty()) {
                break label618;
              }
              if (bool) {
                break label620;
              }
              localz2.addAll((Collection)localObject1);
            }
          }
        }
        Object localObject3;
        if ((i != 0) && (d(localo, locald)))
        {
          do
          {
            if (bool) {
              break;
            }
            if (localk1 != null)
            {
              if (bool) {
                break;
              }
              if (localk1.get(locale1) != null)
              {
                localObject1 = (bd)localk1.get(locale1);
                localObject2 = ((bd)localObject1).b();
                do
                {
                  if (!((Iterator)localObject2).hasNext()) {
                    break;
                  }
                  localObject3 = ((bd.e_)((Iterator)localObject2).next()).a();
                  if (bool) {
                    break label620;
                  }
                  localz1.add(localObject3);
                  if (i != 0) {
                    break label618;
                  }
                } while (i == 0);
              }
            }
          } while (bool);
          if ((!bool) && (localk1 == null)) {}
        }
        while (bool) {
          if ((bool) || (localk1.get(locale2) != null))
          {
            localObject1 = (bd)localk1.get(locale2);
            localObject2 = ((bd)localObject1).b();
            do
            {
              if (!((Iterator)localObject2).hasNext()) {
                break label618;
              }
              localObject3 = ((bd.e_)((Iterator)localObject2).next()).a();
              localz2.add(localObject3);
              if ((!bool) && (i != 0)) {
                break;
              }
            } while (i == 0);
          }
        }
        Object localObject1 = localz1.iterator();
        t localt;
        do
        {
          do
          {
            do
            {
              do
              {
                if (!((Iterator)localObject1).hasNext()) {
                  break;
                }
                localObject2 = (ad)((Iterator)localObject1).next();
              } while (!((ad)localObject2).b());
              if (bool) {
                break label796;
              }
              if (i != 0) {
                break label762;
              }
            } while (!a(localo, locale1, (ad)localObject2));
            localObject3 = a((ad)localObject2, locale1);
            localt = new t(((w)localObject3).a() - 0.5D, ((w)localObject3).b() - 0.5D, 1.0D, 1.0D);
            b().a(localt, new a_(null));
          } while (bool);
        } while (i == 0);
        localObject1 = localz2.iterator();
        do
        {
          do
          {
            do
            {
              if (!((Iterator)localObject1).hasNext()) {
                break;
              }
              localObject2 = (ad)((Iterator)localObject1).next();
            } while (!((ad)localObject2).b());
            if (bool) {
              break label629;
            }
            if (i != 0) {
              break;
            }
          } while (!a(localo, locale2, (ad)localObject2));
          localObject3 = a((ad)localObject2, locale2);
          localt = new t(((w)localObject3).a() - 0.5D, ((w)localObject3).b() - 0.5D, 1.0D, 1.0D);
          b().a(localt, new a_(null));
          if (bool) {
            break label882;
          }
        } while (i == 0);
        localm.f();
      } while (i == 0);
    } while (bool);
    label796:
    label882:
    return;
  }
  
  private boolean a(o paramo, d paramd)
  {
    return cd.a(paramo, paramd);
  }
  
  private boolean c(o paramo, d paramd)
  {
    boolean bool = sb.e;
    k localk1 = paramo.c(ad.q);
    k localk2 = paramo.c(ad.r);
    return ((!bool) && ((localk1 != null) && ((!bool) && (localk1.get(paramd) != null)))) || ((bool) || ((localk2 != null) && (localk2.get(paramd) != null)));
  }
  
  private boolean d(o paramo, d paramd)
  {
    boolean bool = sb.e;
    k localk = paramo.c(bd.a);
    return ((bool) || (localk != null)) && ((bool) || ((localk.get(paramd.e()) != null) || (localk.get(paramd.f()) != null)));
  }
  
  static w a(ad paramad, e parame)
  {
    o localo = (o)parame.g();
    w localw = localo.o(parame);
    double d1 = localw.a() + paramad.c();
    double d2 = localw.b() + paramad.d();
    return new w(d1, d2);
  }
  
  private boolean a(o paramo, e parame, ad paramad)
  {
    zc localzc = paramo.d(parame);
    t localt = new t(localzc.a() - 1.0E-006D, localzc.b() - 1.0E-006D, localzc.c() + 2.0E-006D, localzc.d() + 2.0E-006D);
    w localw1 = paramo.o(parame);
    w localw2 = new w(localw1.a() + paramad.c(), localw1.b() + paramad.d());
    if (!sb.e) {}
    return !t.a(localt.d(), localt.e(), localt.b(), localt.c(), localw2.a(), localw2.b(), true);
  }
  
  private ad a(cd paramcd, o paramo, d paramd, boolean paramBoolean)
  {
    w localw = paramBoolean ? paramo.p(paramd) : paramo.q(paramd);
    if (!sb.e) {
      if (paramcd.a()) {
        return ad.a(localw.a(), localw.b(), paramcd.b());
      }
    }
    return ad.a(paramcd);
  }
  
  private static class a_
  {
    private a_() {}
    
    a_(y.1 param1)
    {
      this();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.y

 * JD-Core Version:    0.7.0.1

 */